# Contributor: Caleb Cushing <xenoterracide@gmail.com>

pkgname=perl-datetime-format-builder
epoch=1
pkgver=0.83
pkgrel=4
pkgdesc="Create DateTime parser classes and objects"
arch=('loong64' 'x86_64')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
provides=("perl-datetime-format-builder=$pkgver")
depends=('perl' 'perl-datetime>=0.12' 'perl-datetime-format-strptime>=1.04' 'perl-params-validate>=0.72')
url='https://search.cpan.org/dist/DateTime-Format-Builder'
source=("https://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/DateTime-Format-Builder-$pkgver.tar.gz")
sha256sums=('61ffb23d85b3ca1786b2da3289e99b57e0625fe0e49db02a6dc0cb62c689e2f2')

build() {
  export PERL_MM_USE_DEFAULT=1
  
  cd "${srcdir}/DateTime-Format-Builder-$pkgver"
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${srcdir}/DateTime-Format-Builder-$pkgver"
  make DESTDIR="$pkgdir" install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
